package com.glela.goods.model;

import com.glela.common.util.DateUtils;

import java.io.Serializable;
import java.util.Date;

public class News implements Serializable{

    private static final long serialVersionUID = 1089101539343017816L;

    private int id;

    private int type;

    private String title;

    private Date ctime;

    private int operatorId;

    private String author;

    private String infoUrl;

    private String imgUrl;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Date getCtime() {
        return ctime;
    }

    public void setCtime(Date ctime) {
        this.ctime = ctime;
    }

    public int getOperatorId() {
        return operatorId;
    }

    public void setOperatorId(int operatorId) {
        this.operatorId = operatorId;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getInfoUrl() {
        return infoUrl;
    }

    public void setInfoUrl(String infoUrl) {
        this.infoUrl = infoUrl;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public String getCtimeStr(){
        if (ctime==null){
            return "";
        }
        return DateUtils.format(ctime,"yyyy-MM-dd HH:mm:ss");
    }
}
